package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysConfiguration;
import com.ruoyi.system.mapper.SysConfigurationMapper;
import com.ruoyi.system.service.ISysConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 配置信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-27
 */
@Service
public class SysConfigurationServiceImpl implements ISysConfigurationService 
{
    @Autowired
    private SysConfigurationMapper sysConfigurationMapper;

    /**
     * 查询配置信息
     * 
     * @param configurationId 配置信息ID
     * @return 配置信息
     */
    @Override
    public SysConfiguration selectSysConfigurationById(String configurationId)
    {
        if(sysConfigurationMapper==null){
            System.out.println("1");
        }
        return sysConfigurationMapper.selectSysConfigurationById(configurationId);
    }

    /**
     * 查询配置信息列表
     * 
     * @param sysConfiguration 配置信息
     * @return 配置信息
     */
    @Override
    public List<SysConfiguration> selectSysConfigurationList(SysConfiguration sysConfiguration)
    {
        return sysConfigurationMapper.selectSysConfigurationList(sysConfiguration);
    }

    /**
     * 新增配置信息
     * 
     * @param sysConfiguration 配置信息
     * @return 结果
     */
    @Override
    public int insertSysConfiguration(SysConfiguration sysConfiguration)
    {
        return sysConfigurationMapper.insertSysConfiguration(sysConfiguration);
    }

    /**
     * 修改配置信息
     * 
     * @param sysConfiguration 配置信息
     * @return 结果
     */
    @Override
    public int updateSysConfiguration(SysConfiguration sysConfiguration)
    {
        return sysConfigurationMapper.updateSysConfiguration(sysConfiguration);
    }

    /**
     * 删除配置信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysConfigurationByIds(String ids)
    {
        return sysConfigurationMapper.deleteSysConfigurationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除配置信息信息
     * 
     * @param configurationId 配置信息ID
     * @return 结果
     */
    @Override
    public int deleteSysConfigurationById(String configurationId)
    {
        return sysConfigurationMapper.deleteSysConfigurationById(configurationId);
    }
}
